home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / FLI106C.ZIP;1 / WINCAS.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-12  |  1.0 KB  |  55 lines

  1. //
  2. // The Fusion Library Interface for DOS
  3. // Version 1.06c
  4. // Copyright (C) 1990, 1991, 1992
  5. // Software Dimensions
  6. //
  7. // FusionWindow
  8. //
  9.  
  10. #include "fliwin.h"
  11.  
  12. #ifdef __BCPLUSPLUS__
  13. #pragma hdrstop
  14. #endif
  15.  
  16. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  17. //
  18. // CascadeWindows()
  19. //
  20. // Cascades the windows
  21. //
  22. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  23.  
  24. void FusionWindow::CascadeWindows()
  25. {
  26.   if (NumberOfWindows<2)
  27.     return;
  28.  
  29.   int CurrentY=1;
  30.   int CurrentHeight=BlazeClass::WhatHeight()-2;
  31.   int Locate=0;
  32.  
  33.   for (int i=NumberOfWindows-1;i>=0;i--)
  34.   {
  35.     Windows[i]->X=Locate;
  36.     Windows[i]->Y=CurrentY;
  37.     Windows[i]->Width=BlazeClass::WhatWidth()-Locate++;
  38.     Windows[i]->Height=CurrentHeight;
  39.  
  40.     CurrentY++;
  41.     CurrentHeight--;
  42.  
  43.     if (CurrentHeight<5)
  44.     {
  45.       CurrentY=1;
  46.       Locate=0;
  47.       CurrentHeight=BlazeClass::WhatHeight()-2;
  48.     }
  49.   }
  50.  
  51.   RemoveAllMenus();
  52.   RefreshWindows();
  53. }
  54.  
  55.